import request from '@/utils/request'

export function getUser(params) {
  return request({
    url: '/user/getUser',
    method: 'get',
    params
  })
}
export function addUser(data) {
  return request({
    url: '/user/addUser',
    method: 'post',
    data: data
  })
}
export function delUserApi(data) {
  return request({
    url: '/user/delUser',
    method: 'post',
    data: data
  })
}
//根据id查询个人信息 param {id:''}
export function getUserInfoApi(data) {
  return request({
    url: '/user/getUserInfo',
    method: 'get',
    params: data
  })
}
//根据id查询个人信息批量查询
export function getUserInfoListApi(data) {
  return request({
    url: '/user/getUserInfoList',
    method: 'post',
    data: data
  })
}
//根据个人id 修改个人信息 包含头像
export function updateUserInfoApi(data) {
  return request({
    url: '/user/updateUserInfo',
    method: 'post',
    data: data
  })
}
//根据个人id 修改密码
export function updatePasswordApi(data) {
  return request({
    url: '/user/updatePassword',
    method: 'post',
    data: data
  })
}
//根据id查询个人信息包含角色 param {userId:''}
export function getRoleByUserIdApi(data) {
  return request({
    url: '/user/getUserRole',
    method: 'get',
    params: data
  })
}
// nba列表
export function getData(param) {
  return request({
    url: '/user/getNbaData',
    method: 'get',
    params: param
  })
}
//添加
export function addNba(data) {
  return request({
    url: '/user/addNbaData',
    method: 'post',
    data: data
  })
}
